import request from '@/utils/request'

// 查询来访登记列表
export function listLaifang(query) {
  return request({
    url: '/commanage/laifang/list',
    method: 'get',
    params: query
  })
}

// 查询来访登记详细
export function getLaifang(id) {
  return request({
    url: '/commanage/laifang/' + id,
    method: 'get'
  })
}

// 新增来访登记
export function addLaifang(data) {
  return request({
    url: '/commanage/laifang',
    method: 'post',
    data: data
  })
}

// 修改来访登记
export function updateLaifang(data) {
  return request({
    url: '/commanage/laifang',
    method: 'put',
    data: data
  })
}

// 删除来访登记
export function delLaifang(id) {
  return request({
    url: '/commanage/laifang/' + id,
    method: 'delete'
  })
}
